package com.tiancheng.trade.payment.channel.umsdhjt.reponse;

import lombok.Data;
import org.apache.commons.lang3.StringUtils;

/**
 * @Author: kellen
 * @Description: 调用大华捷通转账划付接口响应
 * @Date: create in 2024/12/5 20:48
 */
@Data
public class UmsDhjtSettleQueryBalancRes {
    /**
     * 返回代码
     */
    private String errCode;

    /**
     * 返回结果
     */
    private String errMsg;

    /**
     * 明细项
     */
    private UmsDhjtSettleQueryBalancDetail data;

    @Data
    public static class UmsDhjtSettleQueryBalancDetail{
        /**
         * 商户多应用id
         */
        private String mappId;
        /**
         * 响应码
         */
        private String resCode;
        /**
         * 响应信息
         */
        private String resMsg;
        /**
         * 资管账户余额
         */
        private Integer moneyPay;
        /**
         * 暂缓余额
         */
        private Integer pmoney;
        /**
         * 待暂缓金额
         */
        private Integer pmoneyWait;
        /**
         * 本金已冻结金额
         */
        private Integer fmoney;
        /**
         * 本金待冻结金额
         */
        private Integer fmoneyWait;
        /**
         * 已扣收金额
         */
        private Integer kmoney;
        /**
         * 待扣收金额
         */
        private Integer kmoneyWait;
        /**
         * 实时业务本金垫支
         */
        private Integer moneyPrepaySh;
        /**
         * 本金垫支
         */
        private Integer moneyPrepay;
        /**
         * 往期实时业务本金垫支
         */
        private Integer moneyPrepayShHis;
    }

    public boolean isOk(){
        return StringUtils.isNotEmpty(getErrCode()) && getErrCode().equals("000000");
    }

}
